import VueRouter from "vue-router";
import Vue from "vue";

Vue.use(VueRouter);

import Login from "../views/Login/index.vue";
// import Home from "../views/Home/index.vue";

//配置路由
const routes = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/login",
    name: "login",
    component: Login,
  },
  {
    path: "/home",
    name: "home",
    component: Home,
  },
];

//实例化路由
const router = new VueRouter({
  routes,
});

//抛出路由
export default router;